<?php

use yii\db\Schema;
use yii\db\Migration;

class m170516_024026_update_cpe_urls_default_as_empty_string extends Migration
{
    public function up()
    {
        $this->alterColumn('{{%creative}}', 'cpe_show_monitor_url', "varchar(2048) NOT NULL DEFAULT '' COMMENT '点击监测url'");
        $this->alterColumn('{{%creative}}', 'cpe_click_monitor_url', "varchar(2048) NOT NULL DEFAULT '' COMMENT '点击监测url'");
        return true;
    }

    public function down()
    {
        echo "m170516_024026_update_cpe_urls_default_as_empty_string cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
